{extend name='public/base' /}


{block name="content"}

<div class="layui-col-md12" >

    <div class="layui-card" >

        <div class="layui-card-body" >

            <div class="layui-card-header" >修改密码</div >
            <div class="layui-card-body" >

                <div class="layui-form" lay-filter="" >

                    <div class="layui-form-item" >
                        <label class="layui-form-label " >当前密码：</label >
                        <div class="layui-input-inline" >
                            <input type="password" name="oldpassword" lay-verify="required" lay-vertype="tips"  placeholder="请输入当前密码" class="layui-input layui-form-danger" >
                        </div >
                    </div >
                    <input type="hidden" name="__token__" id="token" value="{:token()}"/>

                    <div class="layui-form-item" >
                        <label class="layui-form-label" >新密码：</label >
                        <div class="layui-input-inline" >
                            <input type="password" name="password" lay-verify="required" lay-vertype="tips" placeholder="请输入新密码" autocomplete="off" class="layui-input" >
                        </div >
                        <div class="layui-form-mid layui-word-aux" >6到16个字符</div >
                    </div >

                    <div class="layui-form-item" >
                        <label class="layui-form-label" >确认密码：</label >
                        <div class="layui-input-inline" >
                            <input type="password" name="repassword" lay-verify="required" lay-vertype="tips" autocomplete="off" class="layui-input" >
                        </div >
                    </div >

                    <div class="layui-form-item" >
                        <div class="layui-input-block" >
                            <button class="layui-btn" lay-submit="" lay-filter="setmypass" >确认修改</button >
                        </div >
                    </div >

                </div >

            </div >


        </div >
    </div >

</div >


{/block}

{block name="js"} <!--js处理区-->

<script >

    layui.use(['element', 'form', 'jquery', 'lucky'], function () {
        var element = layui.element;
        var form = layui.form;
        var $ = layui.jquery;
        var lucky = layui.lucky;

        form.render();

        /**
         * 表格{:__('Submit')}
         */
        form.on('submit(setmypass)', function (data) {
            lucky.FormSubmit("{:url('Admin/changPass')}", data.field);
            return false;
        });

    });

</script >


{/block}
